<template>
  <Layout>
    <div>
      <h1>Posts2</h1>
      <ul>
        <li v-for="post in $page.posts.edges" :key="post.node.id">
          <router-link :to="post.node.path">
            {{ post.node.title }}
          </router-link>
        </li>
      </ul>
    </div>
  </Layout>
</template>
<page-query>
query {
  posts: allPost {
    edges {
      node {
        id
        title
        path
      }
    }
  }
}
</page-query>
<script>
export default {
  name: "Posts2",
};
</script>
